<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Checking for a poly_int marker value (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Checking for a poly_int marker value (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Checking for a poly_int marker value (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Comparisons-involving-poly_005fint.html" rel="up" title="Comparisons involving poly_int">
<link href="Range-checks-on-poly_005fints.html" rel="next" title="Range checks on poly_ints">
<link href="Comparing-ordered-poly_005fints.html" rel="prev" title="Comparing ordered poly_ints">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>


</head>

<body lang="en">
<div class="subsection-level-extent" id="Checking-for-a-poly_005fint-marker-value">
<div class="nav-panel">
<p>
Next: <a href="Range-checks-on-poly_005fints.html" accesskey="n" rel="next">Range checks on <code class="code">poly_int</code>s</a>, Previous: <a href="Comparing-ordered-poly_005fints.html" accesskey="p" rel="prev">Comparing ordered <code class="code">poly_int</code>s</a>, Up: <a href="Comparisons-involving-poly_005fint.html" accesskey="u" rel="up">Comparisons involving <code class="code">poly_int</code></a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Checking-for-a-poly_005fint-marker-value-1"><span>10.3.5 Checking for a <code class="code">poly_int</code> marker value<a class="copiable-link" href="#Checking-for-a-poly_005fint-marker-value-1"> &para;</a></span></h4>

<p>It is sometimes useful to have a special &ldquo;marker value&rdquo; that is not
meant to be taken literally.  For example, some code uses a size
of -1 to represent an unknown size, rather than having to carry around
a separate boolean to say whether the size is known.
</p>
<p>The best way of checking whether something is a marker value is
<code class="code">known_eq</code>.  Conversely the best way of checking whether something
is <em class="emph">not</em> a marker value is <code class="code">maybe_ne</code>.
</p>
<p>Thus in the size example just mentioned, &lsquo;<samp class="samp">known_eq (size, -1)</samp>&rsquo; would
check for an unknown size and &lsquo;<samp class="samp">maybe_ne (size, -1)</samp>&rsquo; would check for a
known size.
</p>
</div>



</body>
</html>
